package com.maodou.core.datastore.db.table

import androidx.compose.runtime.getValue
import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.remember
import androidx.compose.runtime.setValue
import androidx.room.Entity

/**
 * @Author Xing
 * @CreateTime 2025年09月22日
 * @Description TODO
 */
@Entity(
    tableName = "account_cache_entries",
    primaryKeys = ["key"]
)
data class AccountEntry(
    val key: String,                            // 业务缓存key
    val accountID: String,                      //“账号ID”
    val userId: String,                         // 用户ID，用于数据隔离
    val nickname: String? = null,               //昵称”“备注”“显示名”
    val password: String? = null,               //“登录密码”
    val phone: String? = null,                  //“手机号”
    val twoFa: String? = null,                  //“2FA” 秘钥
    val email: String? = null,                  //绑定邮箱
    val emailPassword: String? = null,          //邮箱密码
    val ipCountry: String? = null,              //“国家/地区”
    val cookie: String? = null,                 //Cookies
    val authCode: String? = null,                    //毛豆平台签名值 用于向服务器获取认证文件
    val type: String = "个人号",                 //用户自己对账号的分类
    val platform: String = "Facebook",          //账号平台
    val proxyChannel: String? = null,           //代理渠道
    val proxyType: String? = null,              //代理类型
    val proxyHost: String? = null,              //代理主机
    val proxyPort: String? = null,              //代理端口号
    val proxyAccount: String? = null,           //代理账号
    val proxyPassword: String? = null,          //代理密码
    val proxyDetect: String? = null,            //代理检测数据 api解析得到
    val tags: String? = null,                   //用户记录当前账号有什么标签，逗号分割的字符串数组
    var online: Int = 1,                        //账号的检测状态  1=待检测  2=存活中 3=被封禁  ACTIVE 存活 BAN 封禁 UNKNOWN 未知
    var lastCheck: Long? = null,                //检查存活的时间
    var isSelect: Boolean = false,              //本地操作选择时的业务字段
    val updatedAt: Long? = System.currentTimeMillis(), // 更新时间
)